const http = require('http');
const querystring = require('querystring');

let server = http.createServer((request, response) => {
	let str = "";
	// 有一段数据到达了
	request.on('data', data => {
		str += data;
	})

	// 结束了
	request.on('end', () => {
		let post = querystring.parse(str);
		console.log(str, post);
	})
	response.end();
})

server.listen(8080);